package com.xydtech.ecard.merchant.domain.echarts;

import java.util.ArrayList;
import java.util.List;

/**
 * @Title: BaseLineChartEntity
 * @Package: com.xydtech.sem.statistics.domain.echarts
 * @Description: 普通折线图
 * @author: zp
 * @date: 2020-05-16 16:32
 * @version: V1.0
 **/
public class EcardBaseLineChartEntity {

    private Tooltip tooltip;
    private Legend legend;
    private Grid grid;
    private XAxis xAxis;
    private YAxis yAxis;
    private List<Series> series;

    /**
     * 构造函数
     */
    public EcardBaseLineChartEntity() {
        this.tooltip = new Tooltip();
        this.legend = new Legend();
        this.grid = new Grid();
        this.xAxis = new XAxis();
        this.yAxis = new YAxis();
        this.series = new ArrayList<Series>();
    }

    public class Tooltip {

        private String trigger;

        public Tooltip() {
            this.trigger ="axis";
        }

        public void setTrigger(String trigger) {
            this.trigger = trigger;
        }
        public String getTrigger() {
            return trigger;
        }

    }

    public class Legend {

        private List<String> data;
        public void setData(List<String> data) {
            this.data = data;
        }
        public List<String> getData() {
            return data;
        }
    }

    public class Grid {

        private String left;
        private String right;
        private String bottom;
        private boolean containLabel;

        public Grid() {
            this.left = "3%";
            this.right = "4%";
            this.bottom = "3%";
            this.containLabel = true;
        }

        public void setLeft(String left) {
            this.left = left;
        }
        public String getLeft() {
            return left;
        }

        public void setRight(String right) {
            this.right = right;
        }
        public String getRight() {
            return right;
        }

        public void setBottom(String bottom) {
            this.bottom = bottom;
        }
        public String getBottom() {
            return bottom;
        }

        public void setContainLabel(boolean containLabel) {
            this.containLabel = containLabel;
        }
        public boolean getContainLabel() {
            return containLabel;
        }
    }

    public class XAxis {

        private String type;
        private boolean boundaryGap;
        private List<Object> data;

        public XAxis() {
            this.type = "category";
            this.boundaryGap = false;
            this.data = new ArrayList<>();
        }

        public void setType(String type) {
            this.type = type;
        }
        public String getType() {
            return type;
        }

        public void setBoundaryGap(boolean boundaryGap) {
            this.boundaryGap = boundaryGap;
        }
        public boolean getBoundaryGap() {
            return boundaryGap;
        }

        public void setData(List<Object> data) {
            this.data = data;
        }
        public List<Object> getData() {
            return data;
        }
    }

    public class YAxis {

        private String type;

        public YAxis() {
            this.type = "value";
        }

        public void setType(String type) {
            this.type = type;
        }
        public String getType() {
            return type;
        }

    }

    public static class Series {

        private String name;
        private String type;
        private List<Long> data;

        public Series() {
            this.type = "line";
            this.data = new ArrayList<>();
        }

        public void setName(String name) {
            this.name = name;
        }
        public String getName() {
            return name;
        }

        public void setType(String type) {
            this.type = type;
        }
        public String getType() {
            return type;
        }

        public void setData(List<Long> data) {
            this.data = data;
        }
        public List<Long> getData() {
            return data;
        }

    }

    public void setTooltip(Tooltip tooltip) {
        this.tooltip = tooltip;
    }
    public Tooltip getTooltip() {
        return tooltip;
    }

    public void setLegend(Legend legend) {
        this.legend = legend;
    }
    public Legend getLegend() {
        return legend;
    }

    public void setGrid(Grid grid) {
        this.grid = grid;
    }
    public Grid getGrid() {
        return grid;
    }

    public void setXAxis(XAxis xAxis) {
        this.xAxis = xAxis;
    }
    public XAxis getXAxis() {
        return xAxis;
    }

    public void setYAxis(YAxis yAxis) {
        this.yAxis = yAxis;
    }
    public YAxis getYAxis() {
        return yAxis;
    }

    public void setSeries(List<Series> series) {
        this.series = series;
    }
    public List<Series> getSeries() {
        return series;
    }
}
